<?php

/* User not logged in. Just so you know. */

//add the login stylesheet
add_action( 'wp_print_styles', 'add_login_css' );

//THEN display the header. hehe
get_header();

?>

<div class="content">

  <div class="banner"><?php _e( "HELLO!" , 'wordpress-word-trainer'); ?></div>
	
	<?php
	
	$the_content = '';
	
	/* Is this a page? Does it have content? If yes, put that content up instead. */
	if ( have_posts() && is_page() ) : while ( have_posts() ) : the_post();
	  
	  the_post();
	  
	  $the_content = get_the_content();
	  
	endwhile; endif;
	
	?>
	
	<div class="left_column">
		
		<?php echo ( empty( $the_content ) ? sprintf( __( '<h1>Ready to learn?</h1><p>%1$s is a tool for learning words using pictures. Pictures appear on the screen randomly, and can be guessed by the player. This is helpful for kids of a young age or have a difficulty learning to write. Children will be able to playfully learn handling words and get rewarded by getting points.</p><p>This system is powered by WordPress, an open-source system originally designed just for blogs, but has since been developed to be able to be used for pretty much anything. You can get to the administration area by clicking %2$s.</p>' , 'wordpress-word-trainer'), get_bloginfo( 'name' ), '<a href="' .get_bloginfo( 'url' ). '/wp-admin">' .__( "here" , 'wordpress-word-trainer'). '</a>' ) : $the_content ); ?>
	  
	</div>
	
	<div class="login right_column">
	  
	  <h2><?php _e( "LOGIN" , 'wordpress-word-trainer'); ?></h2>
	
		<form method="post" action="http://projects.daveyyzermans.nl/wpwt/wp-login.php" id="loginform" name="loginform">
		
		<p class="login-username">
			<label for="user_login"><?php _e( "NAME:" , 'wordpress-word-trainer'); ?></label><br/><br/>
			<input type="text" tabindex="10" size="20" value="" class="input" id="user_login" name="log" />
		</p>
		<p class="login-password">
			<label for="user_login"><?php _e( "PASSWORD:" , 'wordpress-word-trainer'); ?></label><br/><br/>
			<input type="password" tabindex="20" size="20" value="" class="input" id="user_pass" name="pwd" />
		</p>
		
		<p class="login-remember"><label><input type="checkbox" tabindex="90" value="forever" id="rememberme" name="rememberme" /><?php _e( "REMEMBER" , 'wordpress-word-trainer'); ?></label></p>
		<p class="login-submit">
			<input type="submit" tabindex="100" value="INLOGGEN" class="button-primary" id="wp-submit" name="wp-submit" />
			<input type="hidden" value="http://projects.daveyyzermans.nl/wpwt/" name="redirect_to" />
		</p>
		
	</form>
	
	</div>
	
	<div class="clearboth"></div>
		    
	<?php if ( $_POST['autologin_fail'] == true ) : ?>
	
	<div class="bar bar_red"><?php _e( "Autologin failed to automatically log in to the system. Please login manually." , 'wordpress-word-trainer'); ?></div>
	
	<?php endif; ?>

</div>

<?php get_footer(); ?>